<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
			  <th width="120">属性ID</th>
			  <th width="120">属性名称</th>
			  <th width="120">属性类别</th>
			  <th>属性值</th>
			  <th width="130">操作</th>
			</tr>
			<?php foreach ($data as $v){?>
			<tr>
				<td><?php echo $v['taid']?></td>
				<td><?php echo $v['attname']?></td>
				<td>
					<?php if($v['type']==1){?>
                
					规格
					<?php }else{?>
					属性
					
               <?php }?>
				</td>
				<td><?php echo $v['attvalue']?></td>
				<td>
					<a href="<?php echo U('Attribute/edit',array('taid'=>$v['taid']))?>" class="btn btn-sm btn-warning">编辑</a>
					<a href="javascript:if(confirm('确认删除吗？')) location.href='<?php echo U('Attribute/del',array('taid'=>$v['taid']))?>';" class="btn btn-sm btn-danger">删除</a>
				</td>
			</tr>
			<tr><td colspan="5"></td></tr>
			<?php }?>
		</table>
		<a href="<?php echo U('Attribute/add',array('tid'=>$tid))?>" class="btn btn-sm btn-warning">添加属性表</a>
	</body>
</html>
